<%@ include file="/WEB-INF/include/essay/essayCommon.jspf" %>
<%@ include file="/WEB-INF/include/essay/essayHeader.jspf" %>

<ul data-role="listview" data-inset="true">
	<c:forEach var="essay" items="${essayList}">
		<li data-role="list-divider"><spring:eval expression="essay.dateCreated"/><span class="ui-li-count"><spring:eval expression="essay.no"/></span></li>
		<li><a href="${detailUrl}?no=${essay.no}">
        	<h2><spring:eval expression="essay.title"/></h2>
        	<p><spring:eval expression="essay.content"/></p>
        	<p class="ui-li-aside"><spring:eval expression="essay.type"/></p>
    	</a></li>
	</c:forEach>
</ul>

<div>
	<span>
		<c:if test="${nav.prevPage}">
			<a href="${searchUrl}?page=${nav.startPage - 1}">&lt;</a>
		</c:if>
		<c:forEach var="page" begin="${nav.startPage}" end="${nav.endPage}">
			<c:choose>
				<c:when test="${page == nav.nowPage}">
					<b><a href="${searchUrl}?page=${page}">[${page}]</a></b>&nbsp;
				</c:when>
				<c:otherwise>
					<a href="${searchUrl}?page=${page}">[${page}]</a>&nbsp;	
				</c:otherwise>
			</c:choose>
		</c:forEach>
		<c:if test="${nav.nextPage}">
			<a href="${searchUrl}?page=${nav.endPage + 1}">&gt;</a>
		</c:if>
	</span>
	<button type="button" data-theme="b" data-inline="true" data-icon="plus"><spring:message code="create"/></button>
</div>

<%@ include file="/WEB-INF/include/essay/essayFooter.jspf" %>